<?php echo $this->fetch('header.html'); ?>
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script>
<div class="row">
<div class="span12">

<?php echo $this->fetch('shop_order/nav.html'); ?>
<form method="get" action="<?php echo $this->_var['appadmin']; ?>">
<input type="hidden" name="m" value="shop_order" />
<input type="hidden" name="a" value="default" />
<p>
订单号：<input type="text" name="orderno" value="<?php echo $_GET['orderno']; ?>" />
用户：<input type="text" name="nickname" value="<?php echo $_GET['nickname']; ?>" class="w100" />
状态：<select name="s_status" class="w100">
<option value="-1">请选择</option>
<?php $_from = $this->_var['order_status_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
<?php if ($this->_var['k'] < 99): ?><option value="<?php echo $this->_var['k']; ?>" <?php if ($_GET['s_status'] == $this->_var['k']): ?> selected="selected" <?php endif; ?>><?php echo $this->_var['c']; ?></option><?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
支付：<select name="s_ispay" class="w100">
<option value="-1">请选择</option>
<?php $_from = $this->_var['order_ispay']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?> 
<option value="<?php echo $this->_var['k']; ?>" <?php if ($_GET['s_ispay'] == $this->_var['k']): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['c']; ?></option>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
<br />
 
开始时间：<input type="text" name="start_time" value="<?php echo $_GET['start_time']; ?>"  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
结束时间：<input type="text" name="end_time" value="<?php echo $_GET['end_time']; ?>"   onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
<input type="submit" value="搜索" class="btn btn-warning" />
</p>
</form>
<table width="100%" class="table table-bordered">
<tr>
<td>ID</td>
<td>订单号</td>
<td>联系方式</td>
<td>下单时间</td>
<td>支付状况</td>
<td>所在店铺</td>
<td>价格</td>
<td>状态</td>
<td>操作</td>
</tr>
<?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
<td><?php echo $this->_var['c']['order_id']; ?></td>
<td><?php echo $this->_var['c']['orderno']; ?></td>
<td><?php echo $this->_var['c']['address']['truename']; ?><br>
	<?php echo $this->_var['c']['address']['telephone']; ?> 
</td>
<td><?php echo date("m-d H:i",$this->_var['c']['dateline']); ?></td>
<td><?php echo $this->_var['order_ispay'][$this->_var['c']['ispay']]; ?></td>
<td><?php echo $this->_var['c']['shop_name']; ?></td>
<td><?php echo $this->_var['c']['money']; ?></td>
<td><?php echo $this->_var['order_status_list'][$this->_var['c']['status']]; ?></td>
<td><a href="<?php echo $this->_var['appadmin']; ?>?m=shop_order&a=show&order_id=<?php echo $this->_var['c']['order_id']; ?>">查看</a></td>
</tr>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

</table>
<?php echo $this->_var['pagelist']; ?>
</div>

</div>

<?php echo $this->fetch('footer.html'); ?>